package com.dayuanit.dy15.atm.mapper;

import com.dayuanit.dy15.atm.entity.TransferOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TransferOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TransferOrder record);

    int insertSelective(TransferOrder record);

    TransferOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TransferOrder record);

    int updateByPrimaryKey(TransferOrder record);

    List<TransferOrder> listOrder(Integer status);

    int updateStatus(@Param("orderId") Long orderId,
                     @Param("oldStatus") Integer oldStatus,
                     @Param("newStatus") Integer newStatus);


    List<TransferOrder> listOrder4Back(Integer status);

    List<TransferOrder> listByUserId(@Param("userId") Long userId,
                                     @Param("offset") Integer offset,
                                     @Param("pageSize") Integer pageSize);

    int countByUserId(Long userId);

}